package fileSearchSystem;

/**
 * This class (part of the MVC structure) calls the model function that
 * will truncate the table tags
 */
public class truncExecuter 
{
	SearchParser sp  = SearchParser.getInstance();
	static private truncExecuter instance = null;
	//for singleton
	private static Object someObject = new Object();
	
	private truncExecuter(){}
	
	static public truncExecuter getInstance() 
	{
		if(null == instance) 
		{
			//to insure that the time slice doesn't cause to creation of 2 instances
			synchronized (someObject) 
			{
				if (null == instance)
					instance = new truncExecuter();
			}
		}
	    return instance;
	}
	
	/**
	 * Call a function which truncate the DB tags
	 */
	public void execute()
	{
		sp.truncate();
	}	
}